﻿<?xml version="1.0" encoding="utf-8" ?>
<AgileMapper>
  <Extensions>
    <Extension Name="SimpleMappingRule" Type="Green.AgileMapper.SimpleMappingRule,Green.AgileMapper"></Extension>
    <Extension Name="ObjectMappingRule" Type="Green.AgileMapper.ObjectMappingRule,Green.AgileMapper"></Extension>
    <Extension Name="CollectionMappingRule" Type="Green.AgileMapper.CollectionMappingRule,Green.AgileMapper"></Extension>
    <Extension Name="ExpressionMappingRule" Type="Green.AgileMapper.ExpressionMappingRule,Green.AgileMapper"></Extension>
  </Extensions>
  <Mappings>
    <Mapping FromType="Green.AgileMapper.Test.StudenDto,AgileMapper.Test"  >
      <SimpleMappingRule FromPoperty="Country" ToPoperty="Address.Country"></SimpleMappingRule>
      <SimpleMappingRule FromPoperty="Province" ToPoperty="Address.Province"></SimpleMappingRule>           
      <ObjectMappingRule  FromPoperty="ContactWay" ToPoperty="ContactWay"></ObjectMappingRule>
      <CollectionMappingRule FromPoperty="CourseIds" ToPoperty="CourseIds"></CollectionMappingRule>
      <CollectionMappingRule FromPoperty="Propertys" ToPoperty="Propertys" EqualExpression="fromObjItem.Key==domainObjItem.Key" IsDeleteNotInFromItem="true"></CollectionMappingRule>
      <ExpressionMappingRule  FromPoperty="Particular" Expression="domainObj.Address.Country +domainObj.Address.Province"></ExpressionMappingRule>
      <ExpressionMappingRule  FromPoperty="FirstPropertyKey" Expression="domainObj.Propertys[0].Key"></ExpressionMappingRule>
      <Ignores>
        <Ignore Name="Street"></Ignore>
      </Ignores>
    </Mapping>
  </Mappings>
</AgileMapper>